package com.tedt.boot23.mapper;


import com.tedt.boot23.entity.Emp;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmpMapper {
//增
@Insert("insert into myemp values(null,#{name},#{sal},#{job})")
    void insert(Emp emp);

//    删

    @Delete("delete from myemp where id=#{id}")
    void delete(int id);

//    改

    @Update("update myemp set name=#{name},sal=#{sal},job=#{job} where id=#{id}")
    void update(Emp emp);

//    查

@Select("select *from myemp")
    List<Emp>select();









}

























